package com.carlos.javacallspython.controller;

import com.carlos.javacallspython.service.CallPythonService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RestController
public class CallPythonController {

    private final CallPythonService callPythonService;

    public CallPythonController(CallPythonService callPythonService) {
        this.callPythonService = callPythonService;
    }

    @PostMapping("/compute")
    public Object callPython() throws IOException {
        return callPythonService.compute();
    }
}
